﻿
using System;
using System.Linq;



    class IsTheThirdBitOneOrZero
    {
        static void Main(string[] args)
        {
            int number = 12;
            Console.WriteLine(Convert.ToString(number,2));
            int mask = 1;
            int numberAndMask = number & (mask << 3);
            bool isTheBitZero = (numberAndMask == 0);
            if (isTheBitZero)
            {
                Console.WriteLine("The third bit is zero: " + isTheBitZero);
            }
            else
            {
                Console.WriteLine("The third bit is zero: " + isTheBitZero);
            }
           

        }
    }

